<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
    	<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>TEST</title>
		
		<link href="lib/css/bootstrap.min.css" rel="stylesheet">
		<style>
		#source{
			width: 100%;
			height: 500px;
		}
		</style>
	</head>
	<body>
		<div class="container">
			<div class="row">
				<div class="col-md-6">
					WIKI代码:
				</div>
				<div class="col-md-6">
					转换结果
				</div>
			</div>
			<h1 id="title">本页标题</h1>
			<hr>
			<div class="row">
				<div class="col-md-6">
					<textarea id="source" placeholder="FeelyWiki Code here..."></textarea>
				</div>
				<div class="col-md-6">
					<div id="result"></div>
				</div>
			</div>
		</div>
		<script src="lib/js/jquery.min.js"></script>
		<script src="lib/js/bootstrap.min.js"></script>
		<script src="jquery.feelywikicode.js"></script>
		<script>
			$(function(){
				$.feelywiki.init({
					"titleElem" : "#title",
					"wikiPrefix" : "/wiki/",
					"redirectParam" : "redirectfrom",
				})
				$("#source").change(function(){
					var result = $.feelywiki.start($("#source").val());
					$("#result").html(result);
				});
			});
		</script>
	</body>
</html>